/**
 * create by young (young2f@outlook.com) on 2023/6/18
 */
'use strict';
import request from '../utils/request';

export default class ruleEngine {
  static async create(data) {
    return request('/api/rule/engine/create', {
      method: 'POST',
      body: data,
    });
  }

  static async find(data) {
    return request('/api/rule/engine/find', {
      method: 'POST',
      body: data,
    });
  }

  static async findPage(data) {
    return request('/api/rule/engine/find/page', {
      method: 'POST',
      body: data,
    });
  }
  static async findMany(data) {
    return request('/api/rule/engine/find/many', {
      method: 'POST',
      body: data,
    });
  }
  static async delete(data) {
    return request('/api/rule/engine/delete', {
      method: 'POST',
      body: data,
    });
  }

  static async update(data) {
    return request('/api/rule/engine/update', {
      method: 'POST',
      body: data,
    });
  }

  static async enableEngine(data) {
    return request('/api/rule/engine/enable', {
      method: 'POST',
      body: data,
    });
  }
  static async createProp(data) {
    return request('/api/rule/engine/prop/create', {
      method: 'POST',
      body: data,
    });
  }
  static async updateProp(data) {
    return request('/api/rule/engine/prop/update', {
      method: 'POST',
      body: data,
    });
  }
}
